<template>
	<div>
		<h1>NiHao</h1>
		<van-button type="primary" @click="post()">请求</van-button>

		<van-button type="primary" @click="show=true">主要按钮</van-button>


		<el-select v-model="value" placeholder="请选择">
			<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
			</el-option>
		</el-select>


		<van-picker :columns="columns" @change="onChange" :style="{height: '10%',background:'red'}" />

		<van-popup v-model="show" position="top" :style="{height: '30px',background:'red'}">

			<div>



			</div>

		</van-popup>
	</div>
</template>

<script>
	export default {

		data() {
			return {

				options: [{
					value: '选项1',
					label: '黄金糕'
				}, {
					value: '选项2',
					label: '双皮奶'
				}, {
					value: '选项3',
					label: '蚵仔煎'
				}, {
					value: '选项4',
					label: '龙须面'
				}, {
					value: '选项5',
					label: '北京烤鸭'
				}],
				value: '',
				columns: ['城市——杭州', '城市——宁波', '城市——温州', '城市——嘉兴', '城市——湖州'],
				show: false
			}
		},
		methods: {
			onChange(picker, value, index) {
				Toast(`当前值：${value}, 当前索引：${index}`);
			},

			post() {


				this.axios.post('http://129.211.90.180:8088/box/getAdmin1')
					.then((res) => {
						
						alert("YES!");
				
					})
					.catch(function(error) {
						console.log(error);
					});

			}
			
			
		}



	}
</script>

<style>

</style>
